import java.util.LinkedList;
import java.util.Queue;

public class Text {
    public static void main(String[] args) {
        MyQueue2 myQueue2 = new MyQueue2();
        myQueue2.offer(9);
        myQueue2.offer(6);
        myQueue2.offer(4);
        myQueue2.offer(3);
        myQueue2.offer(2);
        System.out.println(myQueue2.getUsedSize());
        System.out.println(myQueue2.peek());
        System.out.println(myQueue2.poll());
        System.out.println(myQueue2.poll());
        System.out.println(myQueue2.poll());
        System.out.println(myQueue2.poll());
        System.out.println(myQueue2.poll());
    }
    public static void main2(String[] args) {
        Queue<Integer> queue = new LinkedList<>();
        queue.offer(6);
        queue.offer(7);
        queue.offer(8);
        queue.offer(9);
        queue.offer(10);
        System.out.println(queue.toString());
        System.out.println(queue.size());
        System.out.println(queue.peek());
        System.out.println(queue.poll());
        System.out.println(queue.poll());
        System.out.println(queue.poll());
        System.out.println(queue.poll());
        System.out.println(queue.poll());
    }
    public static void main1(String[] args) {
        MyQueue myQueue = new MyQueue();
        myQueue.offer(1);
        myQueue.offer(5);
        myQueue.offer(8);
        myQueue.offer(13);
        myQueue.offer(19);
        System.out.println(myQueue.getUsedSize());
        System.out.println(myQueue.peek());
        System.out.println(myQueue.poll());
        System.out.println(myQueue.poll());
        System.out.println(myQueue.poll());
        System.out.println(myQueue.poll());
        System.out.println(myQueue.poll());
    }
}
